# Maintainer: Gennady Feldman <gena01@gmail.com>
# Contributor: Gennady Feldman <gena01@gmail.com>
pkgname=py3-avro
_pkgname=avro
pkgver=1.11.2
pkgrel=1
pkgdesc="Serialization and RPC framework"
url="https://avro.apache.org/"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="
	py3-gpep517
	py3-isort
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/apache/$_pkgname/archive/release-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-release-$pkgver/lang/py"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
81771c64ab9360206844bd58cc514f60944b75460223b95711de94c8fa046fdfc6ad793b5b29b63fd12dd58d0d2a343f622e4e0843f0443c948a24926f1b8fe0  py3-avro-1.11.2.tar.gz
"
